﻿<div bsModal #createOrEditModal="bs-modal" (onShown)="onShown()" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="createOrEditModal"
     aria-hidden="true" [config]="{backdrop: 'static'}">
    <div class="modal-dialog modal-lg">

        <div class="modal-content">
            <form *ngIf="active" #articleTagInfoForm="ngForm" novalidate (ngSubmit)="save()">
                <div class="modal-header">
                    <h5 class="modal-title">
                        <span *ngIf="formModel.id">{{l("Edit")}}</span>
                        <span *ngIf="!formModel.id">{{l("Create")}}</span>
                    </h5>
                    <button type="button" class="close" (click)="close()" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>

                <div class="modal-body">
                    <div class="row">
					<div class="form-group form-md-line-input form-md-floating-label no-hint col-xl-12">
						<label>{{l("ArticleInfo")}} *</label>
						<data-combo *ngIf="articleInfoComboItemDtoList" [(selectedValue)]="formModel.articleInfoId" [values]="articleInfoComboItemDtoList"></data-combo>
					</div>
					<div class="form-group form-md-line-input form-md-floating-label no-hint col-xl-12">
						<label>{{l("Name")}} *</label>
						<input  class="form-control" type="text" name="Name" 
						[ngClass]="{'edited': formModel.name}" 
						[(ngModel)]="formModel.name" 
						[required]="true"
                        
						maxlength="50"
						minlength=""
						>
					</div>
                    </div>
				</div>
				<div class="modal-footer">
                    <button type="button" [disabled]="saving" class="btn btn-secondary" (click)="close()">{{l("Cancel")}}</button>
                    <button type="submit" [buttonBusy]="saving" [busyText]="l('SavingWithThreeDot')" [disabled]="!articleTagInfoForm.form.valid" class="btn btn-primary"><i class="fa fa-save"></i> <span>{{l("Save")}}</span></button>
                </div>
            </form>
        </div>
    </div>
</div>